package mwt.xml.xdbforms.dbms.metadata.impl;

import java.util.Set;

public class TableMetadata {
    /** Database schema name */
    private String schemaName;

    /** table name */
    private String name;

    /**
     * table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE",
     * "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
     */
    private String type;

    /** explanatory comment on the table */
    private String remarks;

    /** table columns */
    private Set<ColumnMetadata> columns;

    /** table primary keys */
    private Set<PrimaryKeyMetadata> pks;

    /**
     * primary key columns that are referenced by the given table's foreign
     * key columns (the primary keys imported by a table)
     */
    private Set<ForeignKeyMetadata> importedKeys;

    /**
     * description of the foreign key columns that reference the given
     * table's primary key columns (the foreign keys exported by a table)
     */
    private Set<ForeignKeyMetadata> exportedKeys;

    public TableMetadata() {
        super();
    }

    public TableMetadata(String schemaName, String name, String type, String remarks) {
        this.schemaName = schemaName;
        this.name = name;
        this.type = type;
        this.remarks = remarks;
    }

    public String getSchemaName() {
        return schemaName;
    }

    public void setSchemaName(String schemaName) {
        this.schemaName = schemaName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Set<ColumnMetadata> getColumns() {
        return columns;
    }

    public void setColumns(Set<ColumnMetadata> columns) {
        this.columns = columns;
    }

    public Set<ForeignKeyMetadata> getExportedKeys() {
        return exportedKeys;
    }

    public void setExportedKeys(Set<ForeignKeyMetadata> exportedKeys) {
        this.exportedKeys = exportedKeys;
    }

    public Set<ForeignKeyMetadata> getImportedKeys() {
        return importedKeys;
    }

    public void setImportedKeys(Set<ForeignKeyMetadata> importedKeys) {
        this.importedKeys = importedKeys;
    }

    public Set<PrimaryKeyMetadata> getPks() {
        return pks;
    }

    public void setPks(Set<PrimaryKeyMetadata> pks) {
        this.pks = pks;
    }
}
